Repository navigation
fix: count unsupported operators with side effects - #4703
Merged
lanluo-nvidia merged 1 commit intoSep 30, 2026
Merged
lanluo-nvidia merged 1 commit into
lanluo-nvidia merged 1 commit into
Conversation
shoumikhin
force-pushed
the
upstream/full-support-ignores-impure-refusals
branch
from
September 12, 2026 04:58
8f13b84 to
23ae50b
Compare
shoumikhin
force-pushed
the
upstream/full-support-ignores-impure-refusals
branch
3 times, most recently
from
September 30, 2026 01:27
d949794 to
ab85078
Compare
…yTorch require_full_compilation=True is meant to fail if any operator has to run in PyTorch. It did not fail for operators with side effects, such as random or in-place ops, because the full-support check only looked at unsupported_operators, and that dictionary excludes impure operators on purpose. Recent work added a separate fallback_operators record that does include impure refusals. Use it: a model is fully supported only when both unsupported_operators and fallback_operators are empty. This is applied in the fast, global, and hierarchical partitioners. The hierarchical partitioner did not have a fallback record, so add one. unsupported_operators is left exactly as it was, so the fallback reporting that relies on it keeps working unchanged. A refused random operator now makes require_full_compilation raise, while a dry run still reports without raising.
shoumikhin
force-pushed
the
upstream/full-support-ignores-impure-refusals
branch
from
September 30, 2026 02:28
ab85078 to
a1ec9cc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
require_full_compilation=Trueis meant to fail compilation if any operator has to run in PyTorch instead of TensorRT. It did not fail for operators with side effects, such as random number generators or in-place updates, when those operators had no TensorRT converter. The model compiled anyway, with the operator silently left in PyTorch.The reason is how full support was decided. The check only looked at the record of unsupported operators, and that record excludes operators with side effects on purpose. So a refused random operator was invisible to the check.
Change
Recent work added a separate record of every operator that falls back to PyTorch, including the ones with side effects. This change uses that record: a model counts as fully supported only when both the unsupported record and the fallback record are empty. It is applied in the fast, global, and hierarchical partitioners. The hierarchical partitioner did not keep a fallback record, so this adds one.
The unsupported record itself is left exactly as it was, so the fallback reporting that depends on it keeps working unchanged. A refused random operator now makes
require_full_compilation=Trueraise, while a dry run still reports the fallback without raising.Tests
Updated the full-support detection test to the new mechanism: a refused impure operator makes
require_full_compilationraise and is recorded in the fallback record, while the unsupported record stays empty for it. A fully supported model is still accepted, and a refused pure operator is still rejected. Tests were run on Linux x86_64 with the standard build; they exercise the three partitioners' support classes. TensorRT-RTX, Windows, and aarch64 were not rerun.